<?php
 Session_Start () ;
 Include ("../../include/garennes.cfg") ;
 Include ("../../include/init.php") ;
 Include ("../include/config.inc") ;
 verif_droits ($droit_courant, $_SESSION ["code"]) ;
 
 $param_theme = parametres_theme (themeparsession ($_SESSION ["code"])) ;
 $rep_themes = "../../images/themes/" ;
 Include ($rep_themes.$param_theme ["nom_repertoire"]."/".$param_theme ["fichier_config"]) ;
 
 $debut = var_courante ("debut", 0, null) ;
 $param = var_courante ("param", 0, 0) ;
 $mode = var_courante ("mode", 0, 0) ;
 $id_service_prof = var_courante ("id_service_prof", 0, 0) ;
 If ($id_service_prof == 0) { $id_classe = var_courante ("id_classe", 0, 0) ; }
 Else { $id_classe = classe_service_prof ($id_service_prof) ; }
 
 Echo "<html><head>" ;
 entete_html ("Garennes", "", 0) ;
 Echo styles ("none", "none", "none", $theme [0][32], "none") ;
 Echo "</head>" ;
 
 If ((IsSet ($type_theme) And ($type_theme == 1)) Or (!IsSet ($type_theme)))
  {
   Echo "<frameset rows=\"23,90,*\" frameborder=\"0\" border=\"0\">" ;
   If ((IsSet ($debut)) And ($debut == 1))
    {
     Echo "<frame src=\"./status.php?id_classe=0&saisie=0\" name=\"travail_status\" noresize scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\">" ;
     Echo "<frame src=\"./menu_classe.php?id_classe=0&saisie=0\" name=\"travail_menu\" noresize scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\">" ;
     Echo "<frame src=\"" ;
     If ($param == 1) { Echo "./theme_affichage.php?mess=1" ; } Else { Echo "./travail.php?id_classe=0" ; }
     Echo "\" name=\"travail_affichage\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"auto\" frameborder=\"0\">" ;
    }
   Else
    {
     $vp = valide_periode ($id_classe, periode_valide ($id_classe)) ;
     If ($vp == "1")
      {
       Echo "<frame src=\"./status.php?id_classe=".$id_classe."&saisie=1\" name=\"travail_status\" noresize scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\">" ;
       Echo "<frame src=\"./menu_classe.php?id_classe=".$id_classe."&saisie=1\" name=\"travail_menu\" noresize scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\">" ;
      }
     ElseIf ($vp == "0")
      {
       Echo "<frame src=\"./status.php?id_classe=".$id_classe."&saisie=0\" name=\"travail_status\" noresize scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\">" ;
       Echo "<frame src=\"./menu_classe.php?id_classe=".$id_classe."&saisie=0\" name=\"travail_menu\" noresize scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\">" ;
      }
     Else
      {
       Echo "<frame src=\"./status.php?id_classe=".$id_classe."&saisie=-1\" name=\"travail_status\" noresize scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\">" ;
       Echo "<frame src=\"./menu_classe.php?id_classe=".$id_classe."&saisie=-1\" name=\"travail_menu\" noresize scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\">" ;
      }
     If ($param == 1)
      {
       Echo "<frame src=\"./theme_affichage.php?mess=1\" name=\"travail_affichage\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"auto\" frameborder=\"0\">" ;
      }
     Else
      {
       Switch ($mode)
        {
	 Case  2 : Echo "<frame src=\"./cahier_textes.php?id_service_prof=".$id_service_prof."\" name=\"travail_affichage\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"auto\" frameborder=\"0\">" ;
                   Break ;
         Case  3 : Echo "<frame src=\"./grille_classe.php?id_classe=".$id_classe."\" name=\"travail_affichage\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"auto\" frameborder=\"0\">" ;
                   Break ;
         Case  4 : Echo "<frame src=\"./trombinoscope.php?id_classe=".$id_classe."&titre=1\" name=\"travail_affichage\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"auto\" frameborder=\"0\">" ;
                   Break ;
         Case  5 : Echo "<frame src=\"./trombinoscope_prof.php?id_classe=".$id_classe."&titre=1\" name=\"travail_affichage\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"auto\" frameborder=\"0\">" ;
                   Break ;
         Case  6 : Echo "<frame src=\"./parametrages.php?id_classe=".$id_classe."\" name=\"travail_affichage\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"auto\" frameborder=\"0\">" ;
                   Break ;
         Default : Echo "<frame src=\"./travail.php?id_classe=".$id_classe."\" name=\"travail_affichage\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"auto\" frameborder=\"0\">" ;
                   Break ;
        }
      }
    }
   Echo "</frameset></html>" ;
  }
 ElseIf (IsSet ($type_theme) And ($type_theme == 2))
  {
   Echo "</html>" ;
  }
?>